#ifndef __WRAP_DIRECTINPUT8__
#define __WRAP_DIRECTINPUT8__

#include "game_server.h"

class WrapperDirectInput8 : public IDirectInput8{
private:
	IDirectInput8 * m_diput;
	int id;
public:
	static int ins_count_s;
	WrapperDirectInput8(IDirectInput8 * m_ptr, int _id);
	int GetID();
	void SetID(int id);
public:
	/*IUnknown method*/
	COM_METHOD(HRESULT,QueryInterface)(THIS_ REFIID riid,void ** ppvObj);
	COM_METHOD(ULONG, AddRef)(THIS);
	COM_METHOD(ULONG,Release)(THIS);
	/* IDirectInput8 method*/
	COM_METHOD(HRESULT,ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMS lpdiCDParams, DWORD dwFlags, LPVOID pvRefData);
	COM_METHOD(HRESULT,CreateDevice)(THIS_ REFGUID rguid, LPDIRECTINPUTDEVICE8A * lplpDirectInputDevice, LPUNKNOWN pUnkOuter);
	COM_METHOD(HRESULT,EnumDevices)(THIS_ DWORD dwDevType,  LPDIENUMDEVICESCALLBACK lpCallback, LPVOID pvRef, DWORD dwFlags);
	COM_METHOD(HRESULT,EnumDevicesBySemantics)(THIS_ LPCTSTR ptszUserName, LPDIACTIONFORMAT lpdiActionFormat,LPDIENUMDEVICESBYSEMANTICSCB lpCallback,LPVOID pvRef, DWORD dwFlags);
	COM_METHOD(HRESULT,FindDevice)(THIS_ REFGUID rguidClass, LPCTSTR ptszName, LPGUID pguidInstance);
	COM_METHOD(HRESULT,GetDeviceStatus)(THIS_ REFGUID rguidInstance);
	COM_METHOD(HRESULT,Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion);
	COM_METHOD(HRESULT,RunControlPanel)(THIS_ HWND hwndOwner, DWORD dwFlags);
};

#endif